<?php


/*
 * Created on 27.08.2009
 *
 * by MasterGenny
 */

/**
* Value object of team with all attributes in one object 
*/
class ReportVO {

	public $id;

	public $cat;

	public $team;

	public $headline;

	public $text;

	public $date;

	public $authorId;

	public $img;

	public $imgTh;

	public $imgSubTitle;
	
	public $authorName;

	public $authorMail;

	public function __construct($id = 0) {
		$this->id = $id;
		$this->cat = 'XX';
		$this->team = 'XX';
		$this->headline = 'XX';
		$this->text = 'XX';
		$this->date = '1970-01-01';
		$this->authorId = 0;
		$this->img = '';
		$this->imgTh = '';
		$this->imgSubTitle = '';
		$this->authorName = '';
		$this->authorMail = '';
	}

	public function __get($pMemberName) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			return $this-> $member;
		}
	}

	public function __set($pMemberName, $pValue) {
		$member = $pMemberName;
		if (!isset ($this-> $member)) {
			throw new UnknownMemberException(__CLASS__, $pMemberName);
		} else {
			$this-> $member = $pValue;
		}
	}
	
	public function show() {
		$members = get_object_vars($this);
		echo "Report: ";
		foreach ($members as $key => $value) {
			printf("%s= %s ", $key, $value);
		}
		echo "<br/>";
	}
	
	public function getObjectVars() {
		return get_object_vars($this);
	}
}
?>
